import axios from '@/axios.js'

/**
 * @param params username pageNum pageSize
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function selectAllTool(params) {
    return axios.get('/v1/manage/tool', { params });
}

//根据id查询对应的用户
export function selectByToolId(id){
    return  axios.get(`/v1/manage/tool/${id}`)
}

export function deleteByToolId(id){
    return axios.delete(`/v1/manage/tool/${id}`)
}

//添加用户
export function addTool(body){
    return axios.post("/v1/manage/tool",body)
}

//更新用户
export function updateTool(body){
    return axios.put("/v1/manage/tool",body)
}